<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="/static/js/jquery.js"></script>
</head>
<body>
<iframe src="/test1/" frameborder="0" id="iframe1">

</iframe>
<input type="text" id="input3" value="3">
<button>abc</button>
</body>
<script>
    window.onload = function () {
        {#$("#iframe1").contents().find('#input1').val(200)#}
        var iframe = document.getElementById("iframe1");
        var iwindow = iframe.contentWindow;
        var idoc = iwindow.document;
        console.log("window", iwindow);//获取iframe的window对象
        console.log("document", idoc);  //获取iframe的document
        console.log("html", idoc.documentElement);//获取iframe的html
        console.log("head", idoc.head);  //获取head
        console.log("body", idoc.body);  //获取body
        console.log("cookie", idoc.cookie);  //获取cookie
    }
</script>
</html>